﻿<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/WebForm/MasterPage.master"
    CodeFile="ManageSystemParameter.aspx.vb" Inherits="WebForm_ManageSystemParameter" %>
<%@ Register Namespace="My" TagPrefix="cc1" %>
<%@ Register Assembly="App_Code" Namespace="My" TagPrefix="My" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <asp:UpdatePanel ID="UpdatePanel3" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
<TABLE id="table1" cellSpacing=0 cellPadding=0 width="100%" border=0><TBODY><TR><TD align=center><TABLE cellSpacing=0 cellPadding=0 width="99%" border=0><TBODY><TR><TD align=left><My:MyGridView id="gv" PageSize="30" runat="server" meta:resourcekey="gv" SkinID="pager" DataKeyNames="ParameterType,ParameterName,Active" DataSourceID="gv_DS" AllowSorting="True" AllowPaging="True">
<FooterStyle BackColor="White" BorderWidth="0px"></FooterStyle>

<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<Columns>
<asp:TemplateField HeaderText="NO" InsertVisible="False"><ItemTemplate>
                                            <%#gv.PageIndex * gv.PageSize + gv.Rows.Count + 1%>
                                        
</ItemTemplate>

<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Text" SortExpression="Text" meta:resourceKey="gvText"><EditItemTemplate>
<asp:TextBox id="txtText" runat="server" Text='<%# Bind("ParameterText") %>' __designer:wfdid="w138" MaxLength="50"></asp:TextBox><asp:RequiredFieldValidator id="rfvText" runat="server" meta:resourcekey="rfvText" ValidationGroup="vUpdate" __designer:wfdid="w157" ControlToValidate="txtText" Display="None" SetFocusOnError="True">*</asp:RequiredFieldValidator>
</EditItemTemplate>
<ItemTemplate>
                <asp:Label ID="lblText" runat="server" Text='<%# Bind("ParameterText") %>'></asp:Label>
            
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Value" SortExpression="Value" meta:resourceKey="gvValue"><EditItemTemplate>
<asp:TextBox id="txtValue" runat="server" Text='<%# Bind("ParameterValue") %>' MaxLength="50" __designer:wfdid="w1" Width="250px"></asp:TextBox><asp:RequiredFieldValidator id="rfvValue" runat="server" meta:resourcekey="rfvValue" __designer:wfdid="w2" SetFocusOnError="True" Display="None" ControlToValidate="txtValue" ValidationGroup="vUpdate">*</asp:RequiredFieldValidator> 
</EditItemTemplate>
<ItemTemplate>
                <asp:Label ID="Label4" runat="server" Text='<%# Bind("ParameterValue") %>'></asp:Label>
            
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField><EditItemTemplate>
<asp:LinkButton id="linkbUpdate" runat="server" meta:resourcekey="linkbUpdate" ValidationGroup="vUpdate" __designer:wfdid="w160" CommandName="Update" ForeColor="Black"></asp:LinkButton>&nbsp;<asp:LinkButton id="linkbCancel" runat="server" meta:resourcekey="linkbCancel" __designer:wfdid="w161" CommandName="Cancel" ForeColor="Black"></asp:LinkButton> <asp:ValidationSummary id="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="vUpdate" __designer:wfdid="w162"></asp:ValidationSummary> 
</EditItemTemplate>
<ItemTemplate>
<asp:LinkButton id="linkbEdit" runat="server" CommandName="Edit" meta:resourcekey="linkbEdit"></asp:LinkButton>
</ItemTemplate>

<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
</Columns>

<PagerSettings Position="Top"></PagerSettings>
</My:MyGridView> <asp:SqlDataSource id="gv_DS" runat="server" InsertCommand="INSERT INTO [FD_SystemParameter] ([ParameterType], [ParameterName], [ParameterValue], [ParameterText], [Active]) VALUES (@ParameterType, @ParameterName, @ParameterValue, @ParameterText, @Active)" ConnectionString="<%$ ConnectionStrings:connStr %>" UpdateCommand="UPDATE [FD_SystemParameter] SET [ParameterValue] = @ParameterValue, [ParameterText] = @ParameterText, [Active] = @Active WHERE [ParameterType] = @ParameterType AND [ParameterName] = @ParameterName" SelectCommand="SELECT * FROM [FD_SystemParameter]" DeleteCommand="DELETE FROM [FD_SystemParameter] WHERE [ParameterType] = @ParameterType AND [ParameterName] = @ParameterName"><DeleteParameters>
<asp:Parameter Name="ParameterType" Type="String"></asp:Parameter>
<asp:Parameter Name="ParameterName" Type="String"></asp:Parameter>
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="ParameterValue" Type="String"></asp:Parameter>
<asp:Parameter Name="ParameterText" Type="String"></asp:Parameter>
<asp:Parameter Name="Active" Type="String"></asp:Parameter>
<asp:Parameter Name="ParameterType" Type="String"></asp:Parameter>
<asp:Parameter Name="ParameterName" Type="String"></asp:Parameter>
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="ParameterType" Type="String"></asp:Parameter>
<asp:Parameter Name="ParameterName" Type="String"></asp:Parameter>
<asp:Parameter Name="ParameterValue" Type="String"></asp:Parameter>
<asp:Parameter Name="ParameterText" Type="String"></asp:Parameter>
<asp:Parameter Name="Active" Type="String"></asp:Parameter>
</InsertParameters>
</asp:SqlDataSource>&nbsp; </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
</ContentTemplate>
        </asp:UpdatePanel> 
</asp:Content>
